package com.efuture.chapterthree

/* @Description:Kotlin语言substring方法使用
 * @Auther: zhaoshanshan
 * @Date: 2022/03/04/11:25 下午
 */
const val test = "zhaoshanshan is Success";
fun main() {
    val indexOf = test.indexOf("i")
    println(test.substring(0,indexOf))
    println(test.substring(0 until indexOf))//kotlin推荐方式
}